package org.angelica.enums;

/**
 * 通用请求错误码
 * @author aiken
 *
 */
public enum ResponseErrorEnum {
	//服务器异常
	UNKNOWN(-1,"服务器异常"),
	//授权失败
	TOKEN_INVALID(401,"授权失败"),
	//缺失参数
	MISSING_PARAM(1001,"缺失参数："),
	//HTTP请求方式错误
	HTTP_REQUEST_METHOD_NOTSUPPORTED(1002,"HTTP请求方式错误，仅支持："),
	//参数错误
	ERROR_PARAM(1003,"参数错误："),
	//缺失请求头
	MISSING_HEADER(1004,"缺失请求头"),
	//请求超时
	REQUEST_TIME_OUT(1005,"请求超时"),
	//重复请求
	REQUEST_DUPLICATE(1006,"重复请求"),
	//签名错误
	SIGN_ERROR(1007,"签名错误")
	;

	private int code;
	private String msg;
	ResponseErrorEnum(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	public int getCode() {
		return code;
	}
	
	public String getMsg() {
		return msg;
	}
	
}
